package com.zrwl.poscloud.core.task.proxy;

import com.zrwl.poscloud.xo.service.WeixinService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 刘思童
 * @create 2021/3/4 22:09
 **/
@Component
@Slf4j
public class ProxyAccessTokenTask {

    @Autowired
    private WeixinService weixinService;

//    @Scheduled(fixedRate = 7100 * 1000)
    protected void flushAccessToken() {
        log.info("刷新微信公众号AccessToken: " + weixinService.flushAccessToken());
    }
}
